#include "Movie.h"
#include "Action.h"
#include "ActionComedy.h"
#include "Comedy.h"
#include "Disaster.h"
#include "ScienceFiction.h"

void print(Movie &m)
{
	m.print();
}

void main()
{

	setlocale(LC_ALL, "swedish");
	cout << "			==== BETYG 5 ====" << endl;
	cout << "	==Uppgift 5a-c==" << endl;

	Movie m("Thor", 2013);
	Action a("Avengers", 2013);
	ScienceFiction s(false, "Hulk", 2005);
	Comedy c("Bruce almighty", 2008);
	ActionComedy ac("Rush Hour", 2010);
	Disaster d("World destroying","2012", 2012);

	print(m);
	cout << endl;
	print(a);
	cout << endl;
	print(s);
	cout << endl;
	print(c);
	cout << endl;
	print(ac);
	cout << endl;
	print(d);
	cout << endl;


	cout << endl << endl;

	cout << "	==Uppgift 5d==" << endl;

	try
	{
		Movie m1("Dodgeball", 2004);
		Movie m2("Future", 2020);
		Movie m3("ThePast", 1850);
	}

	catch (MovieException ex)
	{
		cout << ex.GetMessage() << endl;
	}


	cout << endl << endl;

	system("pause");
}